package com.site.war.service.impl;

import java.util.List;
import com.site.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.site.war.mapper.SiteFaceRecordMapper;
import com.site.war.domain.SiteFaceRecord;
import com.site.war.service.ISiteFaceRecordService;

/**
 * 人脸识别记录Service业务层处理
 *
 * @author site
 * @date 2023-10-13
 */
@Service
public class SiteFaceRecordServiceImpl implements ISiteFaceRecordService
{
    @Autowired
    private SiteFaceRecordMapper siteFaceRecordMapper;

    /**
     * 查询人脸识别记录
     *
     * @param id 人脸识别记录主键
     * @return 人脸识别记录
     */
    @Override
    public SiteFaceRecord selectSiteFaceRecordById(Long id)
    {
        return siteFaceRecordMapper.selectSiteFaceRecordById(id);
    }

    /**
     * 查询人脸识别记录列表
     *
     * @param siteFaceRecord 人脸识别记录
     * @return 人脸识别记录
     */
    @Override
    public List<SiteFaceRecord> selectSiteFaceRecordList(SiteFaceRecord siteFaceRecord)
    {
        return siteFaceRecordMapper.selectSiteFaceRecordList(siteFaceRecord);
    }

    /**
     * 新增人脸识别记录
     *
     * @param siteFaceRecord 人脸识别记录
     * @return 结果
     */
    @Override
    public int insertSiteFaceRecord(SiteFaceRecord siteFaceRecord)
    {
        siteFaceRecord.setCreateTime(DateUtils.getNowDate());
        return siteFaceRecordMapper.insertSiteFaceRecord(siteFaceRecord);
    }

    /**
     * 修改人脸识别记录
     *
     * @param siteFaceRecord 人脸识别记录
     * @return 结果
     */
    @Override
    public int updateSiteFaceRecord(SiteFaceRecord siteFaceRecord)
    {
        return siteFaceRecordMapper.updateSiteFaceRecord(siteFaceRecord);
    }

    /**
     * 批量删除人脸识别记录
     *
     * @param ids 需要删除的人脸识别记录主键
     * @return 结果
     */
    @Override
    public int deleteSiteFaceRecordByIds(Long[] ids)
    {
        return siteFaceRecordMapper.deleteSiteFaceRecordByIds(ids);
    }

    /**
     * 删除人脸识别记录信息
     *
     * @param id 人脸识别记录主键
     * @return 结果
     */
    @Override
    public int deleteSiteFaceRecordById(Long id)
    {
        return siteFaceRecordMapper.deleteSiteFaceRecordById(id);
    }
}
